package com.le.tester.javaThink.fifth.chapter24_ConcurrentProgramming;

import java.util.concurrent.CompletableFuture;

/**
 * createTime：2021/8/20 13:55
 * description：CompletableApply
 */
public class CompletableApply {
    public static void main(String[] args) {
        CompletableFuture<Machina> cf =
                CompletableFuture.completedFuture(new Machina(0));

        //参数对象就是这个cf
        CompletableFuture<Machina> cf2 = cf.thenApply(Machina::work);
        CompletableFuture<Machina> cf3 = cf2.thenApply(Machina::work);
        CompletableFuture<Machina> cf4 = cf3.thenApply(Machina::work);
        CompletableFuture<Machina> cf5 = cf4.thenApply(Machina::work);


    }
}
